package net.wzyjerry.springboot.demo.service;

import net.wzyjerry.springboot.demo.model.Value;
import org.springframework.data.domain.Page;

/**
 * Created by WzyJerry on 2017/10/21.
 * Value Service
 */
public interface ValueService {

    /**
     * Create value
     *
     * @param value Value
     * @return Created value
     */
    Value Create(Value value);

    /**
     * Update Value
     *
     * @param value Value
     */
    void Update(Value value);

    /**
     * Retrieve value
     *
     * @param id Value id
     * @return Value
     */
    Value Retrieve(Integer id);

    /**
     * Delete value
     *
     * @param id Value id
     */
    void Delete(Integer id);

    /**
     * Get value page
     *
     * @param index page number
     * @return Page of value
     */
    Page<Value> Page(Integer index);

    /**
     * Get the position of the entity(id)
     *
     * @param id Id
     * @return Position
     */
    Integer GetPosition(Integer id);
}
